//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.ttn.common.core.exception;

public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 4369906522471966406L;
    private final ErrorType errorType;

    public BaseException() {
        super();
        this.errorType = SystemErrorType.SYSTEM_ERROR;
    }

    public BaseException(ErrorType errorType) {
        this.errorType = errorType;
    }

    public BaseException(ErrorType errorType, String message) {
        super(message);
        this.errorType = errorType;
    }

    public BaseException(ErrorType errorType, String message, Throwable cause) {
        super(message, cause);
        this.errorType = errorType;
    }

    public ErrorType getErrorType() {
        return this.errorType;
    }

    public BaseException(String code, String msg) {
        super(msg);
        SystemErrorType systemErrorType = SystemErrorType.SYSTEM_ERROR;
        systemErrorType.setCode(code);
        systemErrorType.setMsg(msg);
        this.errorType = systemErrorType;
    }
}
